home *** CD-ROM | disk | FTP | other *** search
/ Aminet 51 / Aminet 51 (2002)(GTI - Schatztruhe)[!][Oct 2002].iso / Aminet / util / arc / xadmasterdev.lha / xad / Sources / clients / xadSPrintF.c < prev    next >
Encoding:
C/C++ Source or Header  |  2002-08-20  |  637 b   |  33 lines

  1. #ifndef XADMASTER_SPRINTF_C
  2. #define XADMASTER_SPRINTF_C
  3.  
  4. /* Programmheader
  5.  
  6.     Name:        SPrintF.c
  7.     Main:        xadmaster
  8.     Versionstring:    $VER: SPrintF.c 1.0 (16.10.1999)
  9.     Author:        SDI
  10.     Distribution:    Freeware
  11.     Description:    sprintf function
  12.  
  13.  1.0   16.10.99 : first version
  14. */
  15.  
  16. #include "SDI_compiler.h"
  17. #include <proto/exec.h>
  18.  
  19. ASM(static void) putfunc(REG(d0, UBYTE data), REG(a3, STRPTR *a))
  20. {
  21.   *((*a)++) = data;
  22. }
  23.  
  24. static void SPrintF(struct ExecBase *SysBase, STRPTR buf, STRPTR format, ...)
  25. {
  26.   STRPTR buf2 = buf;
  27.  
  28.   RawDoFmt(format, (APTR) ((ULONG)&format+sizeof(STRPTR)),
  29.   (void(*)()) putfunc, &buf2);
  30. }
  31.  
  32. #endif /* XADMASTER_SPRINTF_C */
  33.